package com.easylive.admin.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @Author: yudaxian
 * @Description: admin模块的拦截器配置
 * @DateTime: 2024/11/3 14:56
 **/
@Configuration
public class WebAppConfiguration implements WebMvcConfigurer {

    @Resource
    private AppInterceptor appInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(appInterceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/account/checkCode")
                .excludePathPatterns("/account/login");
    }
}
